﻿<%@ Import Namespace="System.Net.Mime"%>
<%@ Import Namespace="System.Data"%>
<%@ Page Language="C#" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<script runat="server">


    private DirectServiceHome _DirectServiceHome = new DirectServiceHome();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (Session["codeOwner"] != null)
            txtHiddenWhereClause.Text = Session["codeOwner"].ToString();
        
    }

</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body runat ="server">
    <form id="form1" runat="server">
      <asp:TextBox ID="txtHiddenWhereClause" runat="server" Height="17px" Width="205px" Visible="False"/>
      <asp:TextBox ID="txthiddenOrderbyClause" runat="server"  Width="77px" Visible="false" />
    <table runat ="server" >
    <tr>
     <td  style="width:130px"></td>
        <td style="text-align:center; font-weight: 700;" class="style1">
            User equipment codes:
        </td>
     </tr>
     <tr id="Tr1"  runat="server">
      <td  style="width:130px"></td>
        <td style="text-align:center">
            <asp:GridView ID="grduserequipmentcode" runat="server" AllowPaging="True" 
                 
                    AllowSorting="True" AutoGenerateColumns="False" 
                    CssClass="GridItem" DataSourceID="dsuserequipmentcode" 
                    RowHeaderColumn="CodeNumber" 
                    width="720px"  DataKeyNames="CodeNumber" PageSize="20" CellPadding="0" 
                    ForeColor="#333333" GridLines="None"
                   >
                   
                    <SelectedRowStyle BackColor="#D1DDF1" Font-Bold="True" ForeColor="#333333" />
                   
                    <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                    <Columns>
                    <%--<a href="worOrderRequestIntranet.aspx?codeNumber=<%#Eval("CodeNumber")%>" > 
                        <asp:BoundField DataField="CodeNumber" HeaderText="CodeNumber" ReadOnly="True" 
                            SortExpression="CodeNumber">
                            <ItemStyle Width="50px" />
                        </asp:BoundField>
                        </a>--%>
                        <asp:TemplateField HeaderText="EquipmentID" SortExpression="CODENUMBER">
                            <ItemTemplate>
                            <a href="workOrderAddAdmin.aspx?codeNumber=<%#Eval("CODENUMBER")%>" > <%# Eval("CODENUMBER")%></a> 
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox0" runat="server" Text='<%# Bind("CODENUMBER") %>' 
                                     Width="200px"></asp:TextBox>
                            </EditItemTemplate>
                            
                            <HeaderStyle HorizontalAlign="Left" />
                            
                            <ItemStyle HorizontalAlign="Left" />
                            
                        </asp:TemplateField>
                        
                         <asp:TemplateField HeaderText="Description" SortExpression="DESCRIPTIONEQUIPMENT">
                            <ItemTemplate>
                            <a href="workOrderAddAdmin.aspx?codeNumber=<%#Eval("CodeNumber")%>" > <%# Eval("DESCRIPTIONEQUIPMENT")%></a> 
                            </ItemTemplate>
                            <EditItemTemplate>
                                &nbsp;<asp:TextBox ID="textBox0" runat="server" Text='<%# Bind("DESCRIPTIONEQUIPMENT") %>' 
                                     Width="95%"></asp:TextBox>
                            </EditItemTemplate>
                            
                             <HeaderStyle HorizontalAlign="Left" />
                             <ItemStyle HorizontalAlign="Left" />
                            
                        </asp:TemplateField>
                        
                    </Columns>
                   <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" BackColor="#2461BF" 
                        ForeColor="White" />
                    <EditRowStyle BackColor="#2461BF" />
                    <FooterStyle BackColor="#5D7B9D" Font-Bold="True" ForeColor="White" />
                    <RowStyle CssClass="AlternativeRowStyle" BackColor="#F7F6F3" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />
                        
                        
                    <FooterStyle BackColor="#507CD1" Font-Bold="True" ForeColor="White" />
                   <RowStyle BackColor="#EFF3FB" />
                   <SelectedRowStyle BackColor="#FF5050" />
                   <HeaderStyle BorderStyle="None" CssClass="GridViewHeader" Height="20px" 
                        Width="30px" />
                        
                    <PagerStyle HorizontalAlign="Center" VerticalAlign="Middle" />
                    <EditRowStyle BackColor="LightGray" />
                    <RowStyle CssClass="AlternativeRowStyle" />
                    <AlternatingRowStyle BackColor="White" CssClass="AlternativeRowStyle" />

 </asp:GridView>
 
                     <asp:ObjectDataSource ID="dsuserequipmentcode" runat="server" 
                SelectMethod="GetUserEquipmentCodde" TypeName="DirectServiceHome" 
                OldValuesParameterFormatString="">
                         <SelectParameters>
                             <asp:ControlParameter ControlID="txtHiddenWhereClause" Name="employeeId" 
                                 PropertyName="Text" Type="Int32" />
                         </SelectParameters>
            </asp:ObjectDataSource>
                 </td>
        
     </tr>
    
    </table>
    
    </form>
</body>
</html>
